<?php
require_once './bin/function.php';
header("Content-Type: text/html;charset=utf-8");
?>
<!DOCTYPE html>
<html>
<head>
    <title>查询</title>
    <meta charset="utf-8">
    <link type="text/css" rel="stylesheet" href="css/base.css"/>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/filter.js"></script>
</head>
<body>
<form class="form-inline">
    <!-- Nav tabs -->
    <ul class="nav nav-tabs" role="tablist" id="menuTabs">
        <li role="presentation" class="active"><a href="#catData" aria-controls="catData" role="tab" data-toggle="tab">猫咪资料</a>
        </li>
        <li role="presentation"><a href="#enemyData" aria-controls="enemyData" role="tab" data-toggle="tab">敌人资料</a>
        </li>
        <li role="presentation"><a href="#CheckpointData" aria-controls="CheckpointData" role="tab" data-toggle="tab">关卡资料</a>
        </li>
        <li role="presentation"><a href="#gameData" aria-controls="gameData" role="tab" data-toggle="tab">游戏系统资料</a>
        </li>
        <li role="presentation"><a href="#aboutUs" aria-controls="aboutUs" role="tab" data-toggle="tab">关于我们</a></li>
    </ul>
    <!-- Tab panes -->
    <div class="tab-content">
        <div role="tabpanel" class="tab-pane active" id="catData">
            <div class="rareBox">
                <span>按稀有度:</span>
                <a id="chk-rare-all" class="btn btn-default">
                    全选
                </a>
                <label class="btn btn-default">
                    <input type="checkbox" id="chk-rare-kihon" class="chk-rare" checked>
                    <i class="fa fa-check glyphicon glyphicon-ok"></i>
                    基本
                </label>
                <label class="btn btn-default">
                    <input type="checkbox" id="chk-rare-ex" class="chk-rare" checked>
                    <i class="fa fa-check glyphicon glyphicon-ok"></i>
                    EX
                </label>
                <label class="btn btn-default">
                    <input type="checkbox" id="chk-rare-rea" class="chk-rare" checked>
                    <i class="fa fa-check glyphicon glyphicon-ok"></i>
                    稀有
                </label>
                <label class="btn btn-default">
                    <input type="checkbox" id="chk-rare-gekirea" class="chk-rare" checked>
                    <i class="fa fa-check glyphicon glyphicon-ok"></i>
                    激稀有
                </label>
                <label class="btn btn-default">
                    <input type="checkbox" id="chk-rare-chougekirea" class="chk-rare" checked>
                    <i class="fa fa-check glyphicon glyphicon-ok"></i>
                    超激稀有
                </label>
                <label class="btn btn-default">
                    <input type="checkbox" id="chk-rare-densetsu" class="chk-rare" checked>
                    <i class="fa fa-check glyphicon glyphicon-ok"></i>
                    传说
                </label>
            </div>
            <!-- rareBox end -->
            <table class="table table-bordered catDataTab">
                <caption>猫咪资料</caption>
                <thead>
                <tr>
                    <th width="3%">NO</th>
                    <th width="5%">稀有度</th>
                    <th width="6%">头像</th>
                    <th width="8%">角色名</th>
                    <th width="10%">角色等级</th>
                    <th width="4%">体力</th>
                    <th width="4%">KB</th>
                    <th width="4%">速度</th>
                    <th width="5%">攻击力</th>
                    <th width="4%">DPS</th>
                    <th width="4%">范围</th>
                    <th width="4%">频度</th>
                    <th width="4%">射程</th>
                    <th width="4%">cost</th>
                    <th width="5%">生产CD</th>
                    <th>特性</th>
                </tr>
                </thead>
                <?php
                $result = queryMySQL("SELECT * FROM cat_detail");
                $nums = $result->num_rows;
                if ($result->num_rows) {
                    for ($j = 0; $j < $nums; $j++) {
                        $row = $result->fetch_array(MYSQLI_ASSOC);
                        echo "<tbody>";
                        echo "<tr>
<td>" . $row['cat_real_ID'] . "</td>
<td>" . $row['rea'] . "</td>
<td>" . $row['imagepath'] . "</td>
<td>" . $row['catname'] . "</td>
<td>" . $row['cat_level'] . "</td>
<td>" . $row['HP'] . "</td>
<td>" . $row['KB'] . "</td>
<td>" . $row['speed'] . "</td>
<td>" . $row['attack_power'] . "</td>
<td>" . $row['attack_power'] . "</td>
<td>" . $row['attack_range'] . "</td>
<td>" . $row['attack_rate'] . "</td>
<td>" . $row['range'] . "</td>
<td>" . $row['cost'] . "</td>
<td>" . $row['cooldown'] . "</td>
<td>" . $row['instructions'] . "</td>
</tr></tbody>";
                    } //end for
                } else {
                    echo "数据库读取错误！";
                } //end if
                ?>
                <tbody>
                <tr>
                    <td>NO</td>
                    <td>稀有度</td>
                    <td>头像</td>
                    <td>角色名</td>
                    <td>角色等级</td>
                    <td>体力</td>
                    <td>KB</td>
                    <td>速度</td>
                    <td>攻击力</td>
                    <td>DPS</td>
                    <td>范围</td>
                    <td>频度</td>
                    <td>射程</td>
                    <td>cost</td>
                    <td>生产CD</td>
                    <td>特性</td>
                </tr>
                </tbody>
            </table>

        </div>
        <!-- catData end -->
        <div role="tabpanel" class="tab-pane" id="enemyData">敌人资料</div>
        <div role="tabpanel" class="tab-pane" id="CheckpointData">关卡资料</div>
        <div role="tabpanel" class="tab-pane" id="gameData">游戏系统资料</div>
        <div role="tabpanel" class="tab-pane" id="aboutUs">关于我们</div>
    </div>
</form>
</body>

</html>